home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PAS_0493 / MCGATEST.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-22  |  672b  |  49 lines

  1. Program MCGATest;
  2.  
  3. uses
  4.   Crt,Dos,MCGALib;
  5.  
  6. var
  7.   Stop,
  8.   Start  :  LongInt;
  9.   Regs   :  Registers;
  10.  
  11. Function Tick : LongInt;
  12. begin
  13.   Regs.ah := 0;
  14.   Intr ($1A,regs);
  15. = egs.cx hl 16  Rgs.dx;
  16. end;
  17.  
  18. Procedure Control;
  19. var
  20.   I,J :  Integr;begin
  21.   Start := ic;
  22.   Fr I := 0 to 199 do
  23.   For J  SetPixe (J,I,Random(256));
  24.  Stop := Tick;
  25. end;
  26.  
  27. Pocdure Closing;
  28. var
  29.   Ch    :  Chr;
  30. begin
  31.   Repet Until Keypressed;
  32.   While Keypressed do Ch:= Reake;
  33.   TextMode (3);
  34. ook '(Stop-Start),' ticks or ,(Stop-Start)/182:4:3,'
  35.  seconds!');
  36. nd;
  37.  
  38. Procedure Init;
  39. begin
  40.   SetGaphMode ($13);
  41.  Randoiz;
  42. end;
  43.  
  44. Begin
  45.  Init;
  46.   Control;
  47.   Cosing;
  48. End.
  49.